home *** CD-ROM | disk | FTP | other *** search
Text File | 1989-10-25 | 2.8 KB | 64 lines | [TEXT/GEOL] |
- Item 0783071 25-Oct-89 10:09
-
- From: D2086 Efficient Field Svc, C Faith,PRT
-
- To: NICK Kledzik, Nick
- CDA0004 VAR Shana Enterprises, Don Murphy
-
- cc: MACAPP.TECH$ MACAPP Tech
-
- Sub: RE File Filter Thoughts
-
- Nick and Wayne,
-
- Thanks for your replies.
-
- I had rather forgotten about the SELF parameter being passed. I had also not
- realized that you can't pass the adress of a method (though perhaps I should
- have), and this was in effect what I was really asking.
-
- When I read you reply Nick I thought it would be the easier course to define a
- global function that would encapsulate the method call (as per Wayne's
- suggestion).
-
- The reason I wanted to do this is that I am making some big changes to the
- MacApp architecture, especially as it concerns TApplication's role. I have
- also made the extensive changes needed to handle TContext and TFile (as
- discussed in Jeff Alger's Frameworks article). I think that currently
- TApplication needs to know to much about the role of its Documents(Contexts)
- files etc. You need to OVERRIDE TApplication.SFGetParms to add a Document that
- uses a new file type or needs a special file filter. These decisions belong in
- the TContext object. The application should merely pass the requests along to
- each of the TContexts that it can create (not just those that are created).
- This holds for finder requests also, TApplication must know what kind of
- TContext to create for each file type. TApplication should ask each context in
- effect, "Can you open this file?".
-
- The fileFilter will simply be an addition of all the fileFilter methods of all
- the TContexts that the application can open. Thus the fileFilter can be
- separately specified for the TContext and can move along with it.
-
- Even the Open Command handling should be handled by the TContexts, the
- application should ask, "Which of you opens with this Open command?". With
- each TContext having a different Open Command number. Duplicates could be
- detected very easily and an appropriate warning given.
-
- At the moment TApplication needs to be changed very frequently when what is
- changing is not the behavior of the application but rather its documents.
-
- The changes I am making will make it possible to add a new TContext by merely
- Using its interface, linking with its code and putting in a linker strip
- suppression line ( IF Member(TObject(NIL),TNewContext) THEN;).
-
- TApplication will need hardly any changes ever!
-
- This type of thing will be very handy for me as I like to code, debug and test
- my applications in smaller chunks and then add them all together (without
- having to change everything under the sun).
-
- It would also be nice to be able to take a TContext from a library and just add
- it without any fuss.
-
- - Curtis
-
-